<?php

class Common_ClientCheck implements PhalApi_Filter {

    public function check() {
        $clientId = DI()->request->get('client_id');

        $allCliendIds = array(
            'phalapi',
            'oschian'
        );

        if (!in_array($clientId, $allCliendIds)) {
            throw new PhalApi_Exception_BadRequest('illegal client id');
        }
    }
}
